Development - #1
Merged
Merged
Conversation
Introduce product API calls and wire up data-table actions/badges. Key changes: ProductService: use new environments import, add flag, getAll and getById. ProductResponse now extends Record<string, unknown>. Data-table: render badges and icon cells, loop actions, centralize clicks with onActionClick and emit actionClick; import BadgeComponent. ProductForm: inject ProductService, add product signal and productById() call. Products page: handle loading/meta from API and added handleProductAction. Move environment files to src/environments and add environment.prod.ts.
Introduce remote-search autocomplete and related backend models/services; enhance product form with inventory tab and invoiced flag. Key changes: - New models: categories, category options, manufacturers, manufacturer options, general query, product request payload. - Utility: buildHttpParams for HttpParams construction. - Services: CategoryService, ManufacturerService, StatusService (use environment.apiUrl). - Design system: AutocompleteSelect component (TS/HTML/CSS) and new icon cases (archive, receipt). - Product form: integrate autocomplete for category/manufacturer, async search with debounced Subjects, add "inventario" tab, inventory fields (warehouse, quantity, min/max, allow_backorder), is_invoiced flag, update payload to include inventory object. - Minor: update index.html title to "RECCOS Shop Car". These changes enable real-time option loading from the API and extend product creation with inventory management.
Introduce a shared DSelectOption model and StatusOption/StatusOptionsResponse models. Add StatusService.getOptions to fetch status options from the API and map responses into DSelectOption shape. Refactor select and autocomplete components to use DSelectOption. Update product form to use signal-based statusOptions, call onStatusSearch during init, replace static status list, and adjust template binding ([options] uses statusOptions()). Also remove an informational panel in the product form template. Small import and signal reorganizations to support these changes.
Introduce ProductFormState model and a product-payload.transformer with helpers (type conversions, transformToCreatePayload, transformToUpdatePayload, validateProductForm, mapProductBackendErrors). Make product request types nullable and add UpdateProductPayload. Add ProductService.create/update methods. Update product form template to surface field errors and product-form.ts to use computed formState, build create/update payloads, populate form from API, call create/update endpoints, and handle validation errors and tab switching.
Introduce a new product creation/workspace feature: adds standalone product-create and product-workspace components with tabbed subcomponents (general, commercial, inventory, media, compatibility, administration) and UI pieces (sidebar, stepper). Adds models, utilities and compatibility-modules.config to centralize compatibility modules. New services: PartOriginService and UnitSaleService; ProductService gains delete(). Payload transformer and request models updated to match create API contract and validation rules. Routes updated to point to new components and appConfig registers provideHttpClient(withFetch()). Legacy product-form files removed and global scrollbar styles refined.
Introduce model and API payload improvements and revamp the product workspace UI. Update UpdateProductPayload (nullable dimensions, barcode, part_origin_id) and add nested UpdateProductPricePayload and UpdateProductInventoryPayload. Change ProductService.getById to expect wrapped getAllResponse. Enhance design-system input to expose step/min/max attrs. Large refactor of product form/sidebar: new responsive, scrollable tab strip, left/right scroll controls, accessible tab roles, new tab keys (classification, logistics, visibility), status/SKU display, improved badges and layout. product-workspace now handles wrapped responses, sets current status, maps nested pricing/inventory, and comments out unused media/admin components. Add .no-scrollbar CSS. Misc whitespace/formatting tweaks.
Refactor: convert product-related fields from camelCase to snake_case across models, components and payload transformer to match API naming. Add warehouses models and WarehousesService and wire warehouseOptions into product workspace and general tab. Extend ProductResponse with richer types (units, part_origin, oem_codes, equivalents, applications, suppliers, created_at/updated_at) and adjust nullable/primitives (active, pricing, inventory). Also minor fixes: select equality check, promotional date nullability, and validation/payload mapping updates to use snake_case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.